﻿using System;
using System.Dynamic;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using DAL;
using Model;
namespace UI.system
{
    public partial class contral :  BaseAdmin
    {
        public AdminInfo user = new AdminInfo();
        public dynamic yeji = new ExpandoObject();
        public string IP = "";
        public string Domain = "";
        public string CpuLoad = "";
        public int ProcessorCount = 0;
        public long MemoryAvailable = 0;
        public long PhysicalMemory = 0;
        public string OSVersion = "";
        public string NetVersion = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            user = B.MyAdmin;
            int count=0;
            SystemInfo system = new SystemInfo();
            if (JobRequest.GetRequestInt("flag") == 0)
            {
                string[] ds = Request.Url.AbsoluteUri.Split('/');
                Domain = ds[0] + "//" + ds[1] + ds[2];
                CpuLoad = system.CpuLoad.ToString();
                ProcessorCount = system.ProcessorCount;
                MemoryAvailable = system.MemoryAvailable / 1024 / 1024;
                PhysicalMemory = system.PhysicalMemory / 1024 / 1024;
                OSVersion = new GetOSystem().GetSystemName();
                NetVersion = system.NetVersion;
            }
            else
            {
                //Response.Write(system.GetAddressIP());
                //Response.End();
            }
        }
    }
}